#include<iostream>
#include<set>

using namespace std;

int main()
{
    int n;
    cin >> n;
    set<int> ret;
    for (int i = 0; i < n; i++)
    {
        int k;
        cin >> k;
        for (int j = 0; j < k; j++)
        {
            int tmp;
            cin >> tmp;
            if (k > 1)
            {
                ret.insert(tmp);
            }
        }
    }
    int num;
    cin >> num;
    set<int> setchar;
    bool flag = true;
    for (int i = 0; i < num; i++)
    {
        int tmp;
        cin >> tmp;
        if (ret.find(tmp) == ret.end())
        {
            if (setchar.find(tmp) == setchar.end())
            {
                if (!flag)
                {
                    cout << " ";
                }
                printf("%05d", tmp);
                flag = false;
            }
            setchar.insert(tmp);
        }
    }

    if (setchar.size() == 0)
        cout << "No one is handsome";
    return 0;
}